use latest with first in laravel eloquent

59

$customer->posts()->latest()->first();
$user = User::where('mobile', Input::get('mobile'))->get();

if (!$user->isEmpty()){
    $firstUser = $user->first()
}

Comments

Submit
0 Comments